Optimal. Leaf size=168 \[ -\frac {A g (a+b x)}{d i^2 (c+d x)}+\frac {B g n (a+b x)}{d i^2 (c+d x)}-\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d i^2 (c+d x)}-\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^2 i^2}-\frac {b B g n \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^2 i^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {2561, 45, 2393,
2332, 2354, 2438} \begin {gather*} -\frac {b B g n \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^2 i^2}-\frac {b g \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^2 i^2}-\frac {A g (a+b x)}{d i^2 (c+d x)}-\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d i^2 (c+d x)}+\frac {B g n (a+b x)}{d i^2 (c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2332
Rule 2354
Rule 2393
Rule 2438
Rule 2561
Rubi steps
\begin {align*} \int \frac {(a g+b g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(145 c+145 d x)^2} \, dx &=\int \left (\frac {(-b c+a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d (c+d x)^2}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d (c+d x)}\right ) \, dx\\ &=\frac {(b g) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{21025 d}-\frac {((b c-a d) g) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^2} \, dx}{21025 d}\\ &=\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}-\frac {(b B g n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{21025 d^2}-\frac {(B (b c-a d) g n) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{21025 d^2}\\ &=\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}-\frac {(b B g n) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{21025 d^2}-\frac {\left (B (b c-a d)^2 g n\right ) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{21025 d^2}\\ &=\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}-\frac {\left (b^2 B g n\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{21025 d^2}+\frac {(b B g n) \int \frac {\log (c+d x)}{c+d x} \, dx}{21025 d}-\frac {\left (B (b c-a d)^2 g n\right ) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{21025 d^2}\\ &=-\frac {B (b c-a d) g n}{21025 d^2 (c+d x)}-\frac {b B g n \log (a+b x)}{21025 d^2}+\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b B g n \log (c+d x)}{21025 d^2}-\frac {b B g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21025 d^2}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}+\frac {(b B g n) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{21025 d^2}+\frac {(b B g n) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{21025 d}\\ &=-\frac {B (b c-a d) g n}{21025 d^2 (c+d x)}-\frac {b B g n \log (a+b x)}{21025 d^2}+\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b B g n \log (c+d x)}{21025 d^2}-\frac {b B g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21025 d^2}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}+\frac {b B g n \log ^2(c+d x)}{42050 d^2}+\frac {(b B g n) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{21025 d^2}\\ &=-\frac {B (b c-a d) g n}{21025 d^2 (c+d x)}-\frac {b B g n \log (a+b x)}{21025 d^2}+\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21025 d^2 (c+d x)}+\frac {b B g n \log (c+d x)}{21025 d^2}-\frac {b B g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21025 d^2}+\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21025 d^2}+\frac {b B g n \log ^2(c+d x)}{42050 d^2}-\frac {b B g n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{21025 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 183, normalized size = 1.09 \begin {gather*} \frac {g \left (\frac {2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c+d x}+2 b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-2 B n \left (\frac {b c-a d}{c+d x}+b \log (a+b x)-b \log (c+d x)\right )-b B n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{2 d^2 i^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \frac {\left (b g x +a g \right ) \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{\left (d i x +c i \right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 866 vs.
\(2 (151) = 302\).
time = 126.45, size = 866, normalized size = 5.15 \begin {gather*} \frac {1}{2} \, {\left (\frac {{\left (B b^{4} c^{3} g n - 3 \, B a b^{3} c^{2} d g n - \frac {2 \, {\left (b x + a\right )} B b^{3} c^{3} d g n}{d x + c} + 3 \, B a^{2} b^{2} c d^{2} g n + \frac {6 \, {\left (b x + a\right )} B a b^{2} c^{2} d^{2} g n}{d x + c} - B a^{3} b d^{3} g n - \frac {6 \, {\left (b x + a\right )} B a^{2} b c d^{3} g n}{d x + c} + \frac {2 \, {\left (b x + a\right )} B a^{3} d^{4} g n}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{2} d^{2} - \frac {2 \, {\left (b x + a\right )} b d^{3}}{d x + c} + \frac {{\left (b x + a\right )}^{2} d^{4}}{{\left (d x + c\right )}^{2}}} + \frac {B b^{4} c^{3} g n - 3 \, B a b^{3} c^{2} d g n - \frac {{\left (b x + a\right )} B b^{3} c^{3} d g n}{d x + c} + 3 \, B a^{2} b^{2} c d^{2} g n + \frac {3 \, {\left (b x + a\right )} B a b^{2} c^{2} d^{2} g n}{d x + c} - B a^{3} b d^{3} g n - \frac {3 \, {\left (b x + a\right )} B a^{2} b c d^{3} g n}{d x + c} + \frac {{\left (b x + a\right )} B a^{3} d^{4} g n}{d x + c} + A b^{4} c^{3} g + B b^{4} c^{3} g - 3 \, A a b^{3} c^{2} d g - 3 \, B a b^{3} c^{2} d g - \frac {2 \, {\left (b x + a\right )} A b^{3} c^{3} d g}{d x + c} - \frac {2 \, {\left (b x + a\right )} B b^{3} c^{3} d g}{d x + c} + 3 \, A a^{2} b^{2} c d^{2} g + 3 \, B a^{2} b^{2} c d^{2} g + \frac {6 \, {\left (b x + a\right )} A a b^{2} c^{2} d^{2} g}{d x + c} + \frac {6 \, {\left (b x + a\right )} B a b^{2} c^{2} d^{2} g}{d x + c} - A a^{3} b d^{3} g - B a^{3} b d^{3} g - \frac {6 \, {\left (b x + a\right )} A a^{2} b c d^{3} g}{d x + c} - \frac {6 \, {\left (b x + a\right )} B a^{2} b c d^{3} g}{d x + c} + \frac {2 \, {\left (b x + a\right )} A a^{3} d^{4} g}{d x + c} + \frac {2 \, {\left (b x + a\right )} B a^{3} d^{4} g}{d x + c}}{b^{2} d^{2} - \frac {2 \, {\left (b x + a\right )} b d^{3}}{d x + c} + \frac {{\left (b x + a\right )}^{2} d^{4}}{{\left (d x + c\right )}^{2}}} + \frac {{\left (B b^{3} c^{3} g n - 3 \, B a b^{2} c^{2} d g n + 3 \, B a^{2} b c d^{2} g n - B a^{3} d^{3} g n\right )} \log \left (-b + \frac {{\left (b x + a\right )} d}{d x + c}\right )}{b d^{2}} - \frac {{\left (B b^{3} c^{3} g n - 3 \, B a b^{2} c^{2} d g n + 3 \, B a^{2} b c d^{2} g n - B a^{3} d^{3} g n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b d^{2}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )}^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (a\,g+b\,g\,x\right )\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (c\,i+d\,i\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________